I am wondering as to why primitives and points don't have normals by default and that ,from what i understand, you have to apply a pointSop with attribute add normals to get a NX,NY ,NZ then perform attrib promote to get the normal of a primitive.
Is this a correct approach if i need the normal of a primitive?
Found 3 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » why don't primitives in hOudini have normals
- Guru Yogibear
- 3 posts
- Offline
Houdini Indie and Apprentice » compare to know if i am dealing with ObjNode or SopNode
- Guru Yogibear
- 3 posts
- Offline
Thank you for your reply,
Unfortunately i am in fact looking for a way to make comparison of the types of nodes and get true false answers from an if statement.
if (nodetype==sopnode):
Unfortunately i am in fact looking for a way to make comparison of the types of nodes and get true false answers from an if statement.
if (nodetype==sopnode):
Houdini Indie and Apprentice » compare to know if i am dealing with ObjNode or SopNode
- Guru Yogibear
- 3 posts
- Offline
hello esteemed members of houdini,
i am trying to make a comparison to know if a node input is of type ObjNode or SopNode.
Here is my shell test code:
>>> a=hou.node('/obj/box_object1')
>>> b=hou.node('/obj/box_object1/box1')
>>> a.type()
<hou.NodeType for Object geo>
>>> b.type()
<hou.SopNodeType for Sop box>
here is my function code:
def modify_my_geometry(inputnode):
if (inputnode.type()==hou.SopNodeType):
print(“I can now access the inputnode.geometry() to modify it”)
else
print(“there is no geometry object here for me to modify”)
As you can see, i am trying to figure out if a geometry is present for me to add primitives ,points etc to it or modify existing.
Can you help me ?
i am trying to make a comparison to know if a node input is of type ObjNode or SopNode.
Here is my shell test code:
>>> a=hou.node('/obj/box_object1')
>>> b=hou.node('/obj/box_object1/box1')
>>> a.type()
<hou.NodeType for Object geo>
>>> b.type()
<hou.SopNodeType for Sop box>
here is my function code:
def modify_my_geometry(inputnode):
if (inputnode.type()==hou.SopNodeType):
print(“I can now access the inputnode.geometry() to modify it”)
else
print(“there is no geometry object here for me to modify”)
As you can see, i am trying to figure out if a geometry is present for me to add primitives ,points etc to it or modify existing.
Can you help me ?
-
- Quick Links